package com.tinem.platform.module.starter.jpa.entity.message;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author fzh
 * @version v1
 * @program: platform
 * @className MessageSend
 * @description 消息发送记录
 * @site
 * @company
 * @create 2021-11-2
 */
@Data
@Entity
@ToString
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Table(name="t_message_send")
@ApiModel("消息发送记录")
public class MessageSend implements Serializable,Cloneable{

    @Id
    @Column(name = "c_id",nullable=true)
    @ApiModelProperty(name = "id", value = "编号",required = true)
    private String id;

    @Column(name = "c_message_id",nullable=true)
    @ApiModelProperty(name = "messageId", value = "消息编号",required = true)
    private String messageId;

    @Column(name = "t_receiver",nullable=true)
    @ApiModelProperty(name = "receiver", value = "接受人",required = true)
    private String receiver;

    @Column(name = "t_type",nullable=true)
    @ApiModelProperty(name = "type", value = "接受类型",required = true)
    private String type;

    @Column(name = "t_send_type",nullable=true)
    @ApiModelProperty(name = "sendType", value = "发送方式",required = true)
    private String sendType;

    @Column(name = "t_is_read",nullable=true)
    @ApiModelProperty(name = "isRead", value = "是否已读;0：未读；1：已读",required = true)
    private Boolean isRead;

    @Column(name = "c_is_revoke",nullable=true)
    @ApiModelProperty(name = "isRevoke", value = "是否撤回;0：未撤回；1：自己撤回；2：管理员撤回",required = true)
    private Integer isRevoke;

    @Column(name = "c_is_delete",nullable=true)
    @ApiModelProperty(name = "isDelete", value = "是否删除;0：未删除；1：自己删除；2：管理员删除",required = true)
    private Integer isDelete;

    @Column(name = "t_body",nullable=true)
    @ApiModelProperty(name = "body", value = "消息内容",required = true)
    private String body;

    @Column(name = "t_error_message",nullable=true)
    @ApiModelProperty(name = "errorMessage", value = "错误提示",required = true)
    private String errorMessage;

    @Column(name = "t_revision",nullable=true)
    @ApiModelProperty(name = "revision", value = "乐观锁",required = true)
    private Integer revision;

    @Column(name = "t_created_by",nullable=true)
    @ApiModelProperty(name = "createdBy", value = "创建人",required = true)
    private String createdBy;

    @Column(name = "t_created_time",nullable=true)
    @ApiModelProperty(name = "createdTime", value = "创建时间",required = true)
    private Date createdTime;

    @Column(name = "t_updated_by",nullable=true)
    @ApiModelProperty(name = "updatedBy", value = "更新人",required = true)
    private String updatedBy;

    @Column(name = "t_updated_time",nullable=true)
    @ApiModelProperty(name = "updatedTime", value = "更新时间",required = true)
    private Date updatedTime;

}